package com.itheima.charstream1;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class CharStreamDemo3 {
    public static void main(String[] args) throws IOException {
//        FileWriter fw = new FileWriter(new File("CharStream\\a.txt"));
        FileWriter fw = new FileWriter("CharStream\\a.txt");

        /*fw.write(97);
        fw.write(98);
        fw.write(99);*/

        /*char[] chars = {97, 98, 99, 100, 101};
        fw.write(chars);*/

        /*char[] chars = {97, 98, 99, 100, 101};
        fw.write(chars, 0, 3);*/

        /*String line = "黑马程序员abc";
        fw.write(line);*/

        String line = "黑马程序员abc";
        fw.write(line, 0, 2);

        fw.close();
    }
}
